package com.chenss.dragonser.activity;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.chenss.dragonser.R;
import com.chenss.dragonser.base.BaseActivity;
import com.chenss.dragonser.model.ServiceInfoModel;

/**
 * PageName: 服务中心信息
 * Create by chenss at 2018/4/20 2:54
 */
public class ServiceInfoActivity extends BaseActivity {
    LinearLayout ll_left;//左边按钮
    TextView tv_page_title;

    TextView tv_name, tv_user, tv_addr, tv_phone;//展示信息

    ServiceInfoModel model;
    @Override
    public void initParms(Bundle parms) {
        model=(ServiceInfoModel)getIntent().getSerializableExtra("serviceInfo");
    }
    @Override
    public int bindLayout() {
        return R.layout.activity_ser_info;
    }

    @Override
    public void initView(View view) {
        ll_left = findView(R.id.ll_left);//左边按钮
        tv_page_title = findView(R.id.tv_page_title);
        ll_left.setVisibility(View.VISIBLE);
        ll_left.setOnClickListener(this);
        tv_page_title.setText("服务中心信息");


        tv_name = findView(R.id.tv_name);
        tv_addr = findView(R.id.tv_addr);
        tv_user = findView(R.id.tv_user);
        tv_phone = findView(R.id.tv_phone);

    }

    @Override
    public void doBusiness(Context mContext) {
        tv_name.setText(model.getStorehouse_name());
        tv_addr.setText(model.getAddress());
        tv_user.setText(model.getUsername());
        tv_phone.setText(model.getPhone());

    }

    @Override
    public void widgetClick(View v) {
        switch (v.getId()) {
            case R.id.ll_left:
                finish();
                break;
        }
    }



}
